using Easislides.Properties;
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace Easislides
{
	public class FrmGenerateDoc : Form
	{
		private enum DocGenType
		{
			Index,
			TitlesRef,
			Complete
		}
		private string[] FList = new string[82];
		private int[] SongFolderLog = new int[32000];
		private int[,] FolderFNum = new int[41, 2];
		private int CurrentSong;
		private int CurSlide;
		private bool ChorusDone;
		private bool BibleItem;
		private bool ShowFirstLineOnly;
		private string[] Verse = new string[160];
		private int SongFolderNo2;
		private int[] ListViewVerseIndex = new int[160];
		private int MaxTextWidth;
		private string RTFLineandNotationsSpacing;
		private string DummyNotationSym = '\u0001'.ToString();
		private string[] ColoursList = new string[6];
		private RichTextBox RichTextBox1 = new RichTextBox();
		private gf.SongSettings DocItem = new gf.SongSettings();
		private ListView SubDivideList = new ListView();
		private int InTransposeOffset = 0;
		private IContainer components = null;
		private GroupBox groupBox5;
		private GroupBox groupBox7;
		private GroupBox groupBox6;
		private GroupBox groupBox3;
		private Button BtnSaveExit;
		private Button BtnCancel;
		private Button BtnOK;
		private Label Mess1;
		private ProgressBar ProgressBar1;
		private GroupBox groupBox2;
		private GroupBox groupBox1;
		private Panel panel1;
		private NumericUpDown tbFontSize0;
		private Label label1;
		private ToolStrip toolStripFont0;
		private ToolStripButton toolStripButton100;
		private ToolStripButton toolStripButton101;
		private ToolStripButton toolStripButton102;
		private Panel panel5;
		private NumericUpDown tbFontSize4;
		private Label label5;
		private ToolStrip toolStripFont4;
		private ToolStripButton toolStripButton14;
		private ToolStripButton toolStripButton15;
		private ToolStripButton toolStripButton16;
		private Panel panel4;
		private NumericUpDown tbFontSize3;
		private Label label4;
		private ToolStrip toolStripFont3;
		private ToolStripButton toolStripButton10;
		private ToolStripButton toolStripButton11;
		private ToolStripButton toolStripButton12;
		private Panel panel3;
		private NumericUpDown tbFontSize2;
		private Label label3;
		private ToolStrip toolStripFont2;
		private ToolStripButton toolStripButton6;
		private ToolStripButton toolStripButton7;
		private ToolStripButton toolStripButton8;
		private Panel panel2;
		private NumericUpDown tbFontSize1;
		private Label label2;
		private ToolStrip toolStripFont1;
		private ToolStripButton toolStripButton2;
		private ToolStripButton toolStripButton3;
		private ToolStripButton toolStripButton4;
		private CheckBox optWords6;
		private CheckBox optWords2;
		private CheckBox optWords1;
		private CheckBox optWords0;
		private CheckBox optPrinterSpaces;
		private CheckBox optShowCapo;
		private CheckBox optShowKey;
		private CheckBox optWords5;
		private RadioButton OptShowSection1;
		private RadioButton OptShowSection0;
		private RadioButton OptShowSection2;
		private CheckBox optWords7;
		private CheckBox optHeadings2;
		private CheckBox optHeadings1;
		private CheckBox optHeadings0;
		private RadioButton OptShowColumns2;
		private RadioButton OptShowColumns1;
		private RadioButton OptLyricsPattern1;
		private RadioButton OptLyricsPattern0;
		private Panel panel6;
		private NumericUpDown tbSpacing1;
		private Label label6;
		private Panel panel7;
		private NumericUpDown tbSpacing0;
		private Label label7;
		private CheckBox optCapoZero;
		private CheckBox optShowTiming;
		private CheckBox optNewScreen;
		private Panel panel8;
		private NumericUpDown tbFontSize5;
		private Label label8;
		private ToolStrip toolStripFont5;
		private ToolStripButton toolStripButton1;
		private ToolStripButton toolStripButton5;
		private ToolStripButton toolStripButton9;
		private ToolTip toolTip1;
		private Panel PanelFontColour1;
		private Panel PanelFontColour5;
		private Panel PanelFontColour4;
		private Panel PanelFontColour3;
		private Panel PanelFontColour2;
		private Panel PanelFontColour0;
		private CheckBox optOneSongPerPage;
		private Button BtnIndexOnly;
		private Button BtnTitlesRef;
		private CheckBox optHeadings3;
		private GroupBox groupBox4;
		private RadioButton OptPageSize1;
		private RadioButton OptPageSize0;
		public FrmGenerateDoc()
		{
			this.InitializeComponent();
		}
		private void FrmFormatPraiseBookDoc_Load(object sender, EventArgs e)
		{
			this.UpdateFontFields(ref this.toolStripFont0, ref this.tbFontSize0, ref this.PanelFontColour0, gf.PB_WordsBold[0], gf.PB_WordsItalic[0], gf.PB_WordsUnderline[0], gf.PB_WordsSize[0], gf.PB_WordsColour[0]);
			this.UpdateFontFields(ref this.toolStripFont1, ref this.tbFontSize1, ref this.PanelFontColour1, gf.PB_WordsBold[1], gf.PB_WordsItalic[1], gf.PB_WordsUnderline[1], gf.PB_WordsSize[1], gf.PB_WordsColour[1]);
			this.UpdateFontFields(ref this.toolStripFont2, ref this.tbFontSize2, ref this.PanelFontColour2, gf.PB_WordsBold[2], gf.PB_WordsItalic[2], gf.PB_WordsUnderline[2], gf.PB_WordsSize[2], gf.PB_WordsColour[2]);
			this.UpdateFontFields(ref this.toolStripFont3, ref this.tbFontSize3, ref this.PanelFontColour3, gf.PB_WordsBold[3], gf.PB_WordsItalic[3], gf.PB_WordsUnderline[3], gf.PB_WordsSize[3], gf.PB_WordsColour[3]);
			this.UpdateFontFields(ref this.toolStripFont4, ref this.tbFontSize4, ref this.PanelFontColour4, gf.PB_WordsBold[4], gf.PB_WordsItalic[4], gf.PB_WordsUnderline[4], gf.PB_WordsSize[4], gf.PB_WordsColour[4]);
			this.UpdateFontFields(ref this.toolStripFont5, ref this.tbFontSize5, ref this.PanelFontColour5, gf.PB_WordsBold[5], gf.PB_WordsItalic[5], gf.PB_WordsUnderline[5], gf.PB_WordsSize[5], gf.PB_WordsColour[5]);
			this.optWords0.Checked = (gf.PB_ShowWords[0] == 1);
			this.optWords1.Checked = (gf.PB_ShowWords[1] == 1);
			this.optWords2.Checked = (gf.PB_ShowWords[2] == 1);
			this.optWords6.Checked = (gf.PB_ShowWords[6] == 1);
			this.optWords7.Checked = (gf.PB_ShowWords[7] == 1);
			this.optHeadings0.Checked = (gf.PB_ShowHeadings[0] == 1);
			this.optHeadings1.Checked = (gf.PB_ShowHeadings[1] == 1);
			this.optHeadings2.Checked = (gf.PB_ShowHeadings[2] == 1);
			this.optHeadings3.Checked = (gf.PB_ShowHeadings[3] == 1);
			if (gf.PB_ShowSection == 0)
			{
				this.OptShowSection0.Checked = true;
			}
			else
			{
				if (gf.PB_ShowSection == 1)
				{
					this.OptShowSection1.Checked = true;
				}
				else
				{
					if (gf.PB_ShowSection == 2)
					{
						this.OptShowSection2.Checked = true;
					}
				}
			}
			if (gf.PB_ShowColumns == 1)
			{
				this.OptShowColumns1.Checked = true;
			}
			else
			{
				if (gf.PB_ShowColumns == 2)
				{
					this.OptShowColumns2.Checked = true;
				}
			}
			if (gf.PB_LyricsPattern == 0)
			{
				this.OptLyricsPattern0.Checked = true;
			}
			else
			{
				this.OptLyricsPattern1.Checked = true;
			}
			if (gf.PB_PageSize == 1)
			{
				this.OptPageSize1.Checked = true;
			}
			else
			{
				this.OptPageSize0.Checked = true;
			}
			this.optPrinterSpaces.Checked = (gf.PB_PrinterSpaces > 0);
			this.optWords5.Checked = (gf.PB_ShowNotations == 1);
			this.optShowTiming.Checked = (gf.PB_ShowTiming == 1);
			this.optShowKey.Checked = (gf.PB_ShowKey == 1);
			this.optShowCapo.Checked = (gf.PB_ShowCapo == 1);
			this.optCapoZero.Checked = (gf.PB_CapoZero == 1);
			this.tbSpacing0.Minimum = 0m;
			this.tbSpacing0.Maximum = 5m;
			this.tbSpacing0.Value = gf.PB_Spacing[0];
			this.tbSpacing1.Minimum = 1m;
			this.tbSpacing1.Maximum = 20m;
			this.tbSpacing1.Value = gf.PB_Spacing[1];
			this.optNewScreen.Checked = (gf.PB_ShowScreenBreaks == 1);
			this.optOneSongPerPage.Checked = (gf.PB_OneSongPerPage == 1);
			this.Mess1.Text = "NOTE - Generate will overwrite: " + gf.PB_FullFileName;
			this.DocItem.Initialise();
			this.DocItem.SplitScreens = false;
			gf.SetListViewColumns(this.SubDivideList, 6);
			gf.PB_FormatChanged = false;
			this.InitRTF();
		}
		private void InitRTF()
		{
			gf.RTFNewLine = "\\b0\\i0\\ulnone\\par ";
			gf.RTFTabValue[0] = 0;
			gf.RTFTabValue[1] = 500;
			gf.RTFTabValue[2] = 1000;
			gf.RTFTabValue[3] = 4400;
			gf.RTFIndent[0] = "\\pard\\fi-" + Convert.ToString(gf.RTFTabValue[0] + 400) + "\\li" + Convert.ToString(gf.RTFTabValue[0] + 400);
			gf.RTFIndent[1] = string.Concat(new string[]
			{
				"\\pard\\fi-",
				Convert.ToString(gf.RTFTabValue[1] + 400),
				"\\li",
				Convert.ToString(gf.RTFTabValue[1] + 400),
				"\\tx",
				Convert.ToString(gf.RTFTabValue[1])
			});
			gf.RTFIndent[2] = string.Concat(new string[]
			{
				"\\pard\\fi-",
				Convert.ToString(gf.RTFTabValue[2] + 400),
				"\\li",
				Convert.ToString(gf.RTFTabValue[2] + 400),
				"\\tx",
				Convert.ToString(gf.RTFTabValue[2])
			});
			if (gf.PB_ShowColumns == 1)
			{
				this.MaxTextWidth = gf.RTFTabValue[3] + 4500;
				gf.RTFIndent[3] = string.Concat(new string[]
				{
					"\\pard\\fi-",
					Convert.ToString(400),
					"\\li",
					Convert.ToString(400),
					"\\ri680\\tqr\\tx",
					Convert.ToString(this.MaxTextWidth)
				});
			}
			else
			{
				this.MaxTextWidth = gf.RTFTabValue[3];
				gf.RTFIndent[3] = string.Concat(new string[]
				{
					"\\pard\\fi-",
					Convert.ToString(400),
					"\\li",
					Convert.ToString(400),
					"\\ri680\\tqr\\tx",
					Convert.ToString(this.MaxTextWidth)
				});
			}
			gf.RTFIndent[4] = string.Concat(new string[]
			{
				"\\pard\\fi-",
				Convert.ToString(gf.RTFTabValue[1] + 400),
				"\\li",
				Convert.ToString(gf.RTFTabValue[1] + 400),
				"\\tx",
				Convert.ToString(gf.RTFTabValue[1])
			});
			gf.RTFIndent[5] = string.Concat(new string[]
			{
				"\\pard\\fi-",
				Convert.ToString(gf.RTFTabValue[1]),
				"\\li",
				Convert.ToString(gf.RTFTabValue[1]),
				"\\tx",
				Convert.ToString(gf.RTFTabValue[1])
			});
			this.RichTextBox1.Height = 0;
			this.RichTextBox1.Top = 0;
		}
		private void UpdateFontFields(ref ToolStrip InToolBar, ref NumericUpDown InUpDown, ref Panel InPanel, int b, int i, int u, int fsize, Color InColour)
		{
			((ToolStripButton)InToolBar.Items[0]).Checked = (b == 1);
			((ToolStripButton)InToolBar.Items[1]).Checked = (i == 1);
			((ToolStripButton)InToolBar.Items[2]).Checked = (u == 1);
			InUpDown.Minimum = 4m;
			InUpDown.Maximum = 72m;
			InUpDown.Value = fsize;
			InPanel.BackColor = InColour;
		}
		private void UpdateFontInfo(ToolStrip InToolBar, NumericUpDown InUpDown, Panel InPanel, ref int b, ref int i, ref int u, ref int fsize, ref Color InColour)
		{
			b = (((ToolStripButton)InToolBar.Items[0]).Checked ? 1 : 0);
			i = (((ToolStripButton)InToolBar.Items[1]).Checked ? 1 : 0);
			u = (((ToolStripButton)InToolBar.Items[2]).Checked ? 1 : 0);
			fsize = (int)InUpDown.Value;
			InColour = InPanel.BackColor;
		}
		private void UpdatePBFormat()
		{
			this.UpdateFontInfo(this.toolStripFont0, this.tbFontSize0, this.PanelFontColour0, ref gf.PB_WordsBold[0], ref gf.PB_WordsItalic[0], ref gf.PB_WordsUnderline[0], ref gf.PB_WordsSize[0], ref gf.PB_WordsColour[0]);
			this.UpdateFontInfo(this.toolStripFont1, this.tbFontSize1, this.PanelFontColour1, ref gf.PB_WordsBold[1], ref gf.PB_WordsItalic[1], ref gf.PB_WordsUnderline[1], ref gf.PB_WordsSize[1], ref gf.PB_WordsColour[1]);
			this.UpdateFontInfo(this.toolStripFont2, this.tbFontSize2, this.PanelFontColour2, ref gf.PB_WordsBold[2], ref gf.PB_WordsItalic[2], ref gf.PB_WordsUnderline[2], ref gf.PB_WordsSize[2], ref gf.PB_WordsColour[2]);
			this.UpdateFontInfo(this.toolStripFont3, this.tbFontSize3, this.PanelFontColour3, ref gf.PB_WordsBold[3], ref gf.PB_WordsItalic[3], ref gf.PB_WordsUnderline[3], ref gf.PB_WordsSize[3], ref gf.PB_WordsColour[3]);
			this.UpdateFontInfo(this.toolStripFont4, this.tbFontSize4, this.PanelFontColour4, ref gf.PB_WordsBold[4], ref gf.PB_WordsItalic[4], ref gf.PB_WordsUnderline[4], ref gf.PB_WordsSize[4], ref gf.PB_WordsColour[4]);
			this.UpdateFontInfo(this.toolStripFont5, this.tbFontSize5, this.PanelFontColour5, ref gf.PB_WordsBold[5], ref gf.PB_WordsItalic[5], ref gf.PB_WordsUnderline[5], ref gf.PB_WordsSize[5], ref gf.PB_WordsColour[5]);
			this.UpdateFontInfo(this.toolStripFont2, this.tbFontSize2, this.PanelFontColour2, ref gf.PB_WordsBold[6], ref gf.PB_WordsItalic[6], ref gf.PB_WordsUnderline[6], ref gf.PB_WordsSize[6], ref gf.PB_WordsColour[6]);
			this.UpdateFontInfo(this.toolStripFont2, this.tbFontSize2, this.PanelFontColour2, ref gf.PB_WordsBold[7], ref gf.PB_WordsItalic[7], ref gf.PB_WordsUnderline[7], ref gf.PB_WordsSize[7], ref gf.PB_WordsColour[7]);
			gf.PB_ShowWords[0] = (this.optWords0.Checked ? 1 : 0);
			gf.PB_ShowWords[1] = (this.optWords1.Checked ? 1 : 0);
			gf.PB_ShowWords[2] = (this.optWords2.Checked ? 1 : 0);
			gf.PB_ShowWords[6] = (this.optWords6.Checked ? 1 : 0);
			gf.PB_ShowWords[7] = (this.optWords7.Checked ? 1 : 0);
			gf.PB_ShowHeadings[0] = (this.optHeadings0.Checked ? 1 : 0);
			gf.PB_ShowHeadings[1] = (this.optHeadings1.Checked ? 1 : 0);
			gf.PB_ShowHeadings[2] = (this.optHeadings2.Checked ? 1 : 0);
			gf.PB_ShowHeadings[3] = (this.optHeadings3.Checked ? 1 : 0);
			if (this.OptShowSection1.Checked)
			{
				gf.PB_ShowSection = 1;
			}
			else
			{
				if (this.OptShowSection2.Checked)
				{
					gf.PB_ShowSection = 2;
				}
				else
				{
					gf.PB_ShowSection = 0;
				}
			}
			gf.PB_ShowColumns = (this.OptShowColumns1.Checked ? 1 : 2);
			gf.PB_LyricsPattern = (this.OptLyricsPattern0.Checked ? 0 : 1);
			gf.PB_PageSize = (this.OptPageSize0.Checked ? 0 : 1);
			gf.PB_ShowScreenBreaks = (this.optNewScreen.Checked ? 1 : 0);
			gf.PB_OneSongPerPage = (this.optOneSongPerPage.Checked ? 1 : 0);
			gf.PB_Spacing[0] = (int)this.tbSpacing0.Value;
			gf.PB_Spacing[1] = (int)this.tbSpacing1.Value;
			gf.PB_PrinterSpaces = (this.optPrinterSpaces.Checked ? 1 : 0);
			gf.SaveRegValue("options", "PrinterSpaces", gf.PB_PrinterSpaces);
			gf.PB_ShowNotations = (this.optWords5.Checked ? 1 : 0);
			gf.PB_ShowTiming = (this.optShowTiming.Checked ? 1 : 0);
			gf.PB_ShowKey = (this.optShowKey.Checked ? 1 : 0);
			gf.PB_ShowCapo = (this.optShowCapo.Checked ? 1 : 0);
			gf.PB_CapoZero = (this.optCapoZero.Checked ? 1 : 0);
			gf.PB_FormatChanged = true;
		}
		private void PanelFontColour_Click(object sender, EventArgs e)
		{
			Panel panel = (Panel)sender;
			Color black = Color.Black;
			switch (gf.ObjToInt(panel.Tag))
			{
			case 0:
				this.PanelFontColour0.BackColor = gf.SelectNewColour(this.PanelFontColour0.BackColor);
				break;
			case 1:
				this.PanelFontColour1.BackColor = gf.SelectNewColour(this.PanelFontColour1.BackColor);
				break;
			case 2:
				this.PanelFontColour2.BackColor = gf.SelectNewColour(this.PanelFontColour2.BackColor);
				break;
			case 3:
				this.PanelFontColour3.BackColor = gf.SelectNewColour(this.PanelFontColour3.BackColor);
				break;
			case 4:
				this.PanelFontColour4.BackColor = gf.SelectNewColour(this.PanelFontColour4.BackColor);
				break;
			case 5:
				this.PanelFontColour5.BackColor = gf.SelectNewColour(this.PanelFontColour5.BackColor);
				break;
			}
		}
		private void BtnIndexOnly_Click(object sender, EventArgs e)
		{
			this.BtnStartPressed(FrmGenerateDoc.DocGenType.Index);
		}
		private void BtnTitlesRef_Click(object sender, EventArgs e)
		{
			this.BtnStartPressed(FrmGenerateDoc.DocGenType.TitlesRef);
		}
		private void BtnOK_Click(object sender, EventArgs e)
		{
			this.BtnStartPressed(FrmGenerateDoc.DocGenType.Complete);
		}
		private void BtnStartPressed(FrmGenerateDoc.DocGenType GenType)
		{
			this.UpdatePBFormat();
			if (this.StartGeneration(GenType))
			{
				gf.RunProcess(gf.PB_FullFileName);
			}
			this.Cursor = Cursors.Default;
			this.ProgressBar1.Value = 0;
			this.Mess1.Visible = true;
		}
		private void BtnSaveExit_Click(object sender, EventArgs e)
		{
			this.UpdatePBFormat();
			base.Close();
		}
		private bool StartGeneration(FrmGenerateDoc.DocGenType GenType)
		{
			bool result;
			try
			{
				this.Cursor = Cursors.WaitCursor;
				this.InitRTF();
				StreamWriter streamWriter = new StreamWriter(gf.PB_FullFileName, false, Encoding.Default);
				try
				{
					this.Mess1.Visible = false;
					this.ProgressBar1.Value = 0;
					this.ProgressBar1.Invalidate();
					int formatOption = 0;
					int num = 0;
					string text = "";
					int num2 = 0;
					gf.RTFLineSpacing = "";
					this.RTFLineandNotationsSpacing = "";
					for (int i = 0; i <= gf.PB_Spacing[0]; i++)
					{
						gf.RTFLineSpacing += gf.RTFNewLine;
						this.RTFLineandNotationsSpacing += "\n";
					}
					streamWriter.Write(this.BuildRTFHeader());
					if (GenType == FrmGenerateDoc.DocGenType.Complete || GenType == FrmGenerateDoc.DocGenType.TitlesRef)
					{
						for (int i = 0; i < gf.TotalPraiseBookItems; i++)
						{
							int num3 = (i + 1) * 100 / gf.TotalPraiseBookItems;
							this.ProgressBar1.Value = ((num3 > 100) ? 100 : num3);
							base.Invalidate();
							this.CurrentSong = i + 1;
							this.LoadItem(ref this.DocItem);
							this.SongFolderLog[i] = this.DocItem.FolderNo;
							string text2 = "";
							if (gf.PB_ShowWords[0] > 0)
							{
								string text3 = gf.ExtractOneInfo(ref gf.DocumentSongs[this.CurrentSong, 4], '>', false, false);
								if (text3 == "")
								{
									text2 = Convert.ToString(i + 1);
								}
								else
								{
									text2 = text3;
								}
							}
							if (gf.PB_ShowWords[1] > 0)
							{
								if (gf.PB_ShowWords[0] > 0)
								{
									text2 = string.Concat(new string[]
									{
										text2,
										".",
										gf.FormatMode(1),
										" ",
										this.DocItem.Title
									});
								}
								else
								{
									text2 = gf.FormatMode(1) + this.DocItem.Title;
								}
							}
							if (gf.PB_ShowWords[2] > 0 | gf.PB_ShowWords[6] > 0 | gf.PB_ShowWords[7] > 0)
							{
								if (gf.PB_ShowWords[0] > 0 & gf.PB_ShowWords[1] > 0)
								{
									streamWriter.Write(this.AddtoRTF(text2, 0, 0, 4, 0, 0));
								}
								else
								{
									if (gf.PB_ShowWords[0] < 1 & gf.PB_ShowWords[1] > 0)
									{
										streamWriter.Write(this.AddtoRTF(text2, 0, 0, 4, 0, 0));
									}
									else
									{
										if (gf.PB_ShowWords[0] > 0 & gf.PB_ShowWords[1] < 1)
										{
											text2 = string.Concat(new string[]
											{
												text2,
												".",
												gf.FormatMode(2),
												" ",
												this.DocItem.Copyright,
												" ",
												this.DocItem.Book_Reference,
												" ",
												this.DocItem.User_Reference
											});
											streamWriter.Write(this.AddtoRTF(text2, 0, 0, 4, 0, 0));
										}
									}
								}
								if (gf.PB_ShowWords[2] > 0 & this.DocItem.Copyright != "")
								{
									streamWriter.Write(this.AddtoRTF(this.DocItem.Copyright, 0, 2, 0, 0, 0));
								}
								if (gf.PB_ShowWords[6] > 0 & this.DocItem.Book_Reference != "")
								{
									streamWriter.Write(this.AddtoRTF(this.DocItem.Book_Reference, 0, 2, 0, 0, 0));
								}
								if (gf.PB_ShowWords[7] > 0 & this.DocItem.User_Reference != "")
								{
									streamWriter.Write(this.AddtoRTF(this.DocItem.User_Reference, 0, 2, 0, 0, 0));
								}
							}
							else
							{
								if (text2.Length > 0)
								{
									streamWriter.Write(this.AddtoRTF(text2, 0, 0, 4, 0, 0));
								}
							}
							num2 = this.DocItem.Capo;
							text = this.DocItem.MusicKey;
							this.InTransposeOffset = 0;
							if (gf.PB_CapoZero > 0)
							{
								if (this.DocItem.MusicKey != "" & num2 >= 0)
								{
									text = this.DocItem.MusicKey;
									gf.TransposeKey(ref text, gf.IncrementChord(ref num2, 0));
								}
							}
							else
							{
								string text4 = gf.DocumentSongs[this.CurrentSong, 4];
								gf.ExtractOneInfo(ref text4, '>');
								this.InTransposeOffset = gf.StringToInt(gf.ExtractOneInfo(ref text4, '>', false, false), false);
								if (this.InTransposeOffset != 0)
								{
									int num4 = 0;
									string musicKey = this.DocItem.MusicKey;
									gf.TransposeKey(ref musicKey, gf.IncrementChord(ref num4, this.InTransposeOffset));
								}
							}
							string text5 = ((gf.PB_ShowKey == 1) ? ((text != "") ? ("Key: " + text + " ") : "") : "") + ((gf.PB_ShowCapo == 1 & gf.PB_CapoZero < 1) ? ((num2 > 0) ? ("Capo " + Convert.ToString(num2) + " ") : "") : "") + ((gf.PB_ShowTiming == 1) ? ((this.DocItem.Timing != "") ? ("(" + this.DocItem.Timing + ")") : "") : "");
							if (text5 != "")
							{
								streamWriter.Write(this.AddtoRTF(text5, 0, 3, 0, 0, 0));
							}
							if (GenType == FrmGenerateDoc.DocGenType.Complete)
							{
								int j = 0;
								for (int k = 1; k <= this.DocItem.TotalSlides; k++)
								{
									if (this.DocItem.Slide[k, 0] == 0)
									{
										j = k;
										num = 1;
									}
									if (j > 0 & this.DocItem.Slide[k, 0] < 0)
									{
										num++;
									}
								}
								int tabNum = 0;
								this.ChorusDone = false;
								for (j = 1; j <= this.DocItem.TotalSlides; j++)
								{
									bool flag = false;
									this.ShowFirstLineOnly = false;
									this.CurSlide = j;
									string text6 = "";
									if (this.DocItem.Slide[this.CurSlide, 0] == 0)
									{
										if (gf.PB_ShowHeadings[1] > 0)
										{
											tabNum = 2;
											if (!this.ChorusDone)
											{
												text6 = gf.FolderLyricsHeading[this.DocItem.FolderNo, 1];
												this.ChorusDone = true;
											}
											else
											{
												this.ShowFirstLineOnly = true;
											}
										}
										else
										{
											if (gf.PB_ShowHeadings[0] > 0)
											{
												if (gf.PB_ShowHeadings[0] > 0 & this.DocItem.VersePresent[2])
												{
													tabNum = 2;
												}
												else
												{
													tabNum = 1;
												}
												if (!this.ChorusDone)
												{
													this.ChorusDone = true;
												}
												else
												{
													this.ShowFirstLineOnly = true;
												}
											}
											else
											{
												tabNum = 1;
												if (!this.ChorusDone)
												{
													this.ChorusDone = true;
												}
												else
												{
													this.ShowFirstLineOnly = true;
												}
											}
										}
										formatOption = 4;
										flag = true;
									}
									else
									{
										if (this.DocItem.Slide[this.CurSlide, 0] == 102)
										{
											if (gf.PB_ShowHeadings[1] > 0)
											{
												tabNum = 2;
												text6 = gf.FolderLyricsHeading[this.DocItem.FolderNo, 1] + ((gf.FolderLyricsHeading[this.DocItem.FolderNo, 1] != "") ? " (2)" : "");
											}
											else
											{
												if (gf.PB_ShowHeadings[0] > 0)
												{
													if (gf.PB_ShowHeadings[0] > 0 & this.DocItem.VersePresent[2])
													{
														tabNum = 2;
													}
													else
													{
														tabNum = 1;
													}
												}
												else
												{
													tabNum = 1;
												}
											}
											formatOption = 4;
											flag = true;
										}
										else
										{
											if (this.DocItem.Slide[this.CurSlide, 0] == 111)
											{
												if (gf.PB_ShowHeadings[3] > 0)
												{
													tabNum = 2;
													text6 = gf.FolderLyricsHeading[this.DocItem.FolderNo, 0];
												}
												else
												{
													if (gf.PB_ShowHeadings[0] > 0)
													{
														if (gf.PB_ShowHeadings[0] > 0 & this.DocItem.VersePresent[2])
														{
															tabNum = 2;
														}
														else
														{
															tabNum = 1;
														}
													}
													else
													{
														tabNum = 1;
													}
												}
												formatOption = 4;
												flag = true;
											}
											else
											{
												if (this.DocItem.Slide[this.CurSlide, 0] == 112)
												{
													if (gf.PB_ShowHeadings[3] > 0)
													{
														tabNum = 2;
														text6 = gf.FolderLyricsHeading[this.DocItem.FolderNo, 0] + ((gf.FolderLyricsHeading[this.DocItem.FolderNo, 0] != "") ? " (2)" : "");
													}
													else
													{
														if (gf.PB_ShowHeadings[0] > 0)
														{
															if (gf.PB_ShowHeadings[0] > 0 & this.DocItem.VersePresent[2])
															{
																tabNum = 2;
															}
															else
															{
																tabNum = 1;
															}
														}
														else
														{
															tabNum = 1;
														}
													}
													formatOption = 4;
													flag = true;
												}
												else
												{
													if (this.DocItem.Slide[this.CurSlide, 0] == 100)
													{
														if (gf.PB_ShowHeadings[2] > 0)
														{
															text6 = gf.FolderLyricsHeading[this.DocItem.FolderNo, 2];
															tabNum = 2;
														}
														else
														{
															if (gf.PB_ShowHeadings[0] > 0)
															{
																if (gf.PB_ShowHeadings[0] > 0 & this.DocItem.VersePresent[2])
																{
																	tabNum = 2;
																}
																else
																{
																	tabNum = 1;
																}
															}
															else
															{
																tabNum = 1;
															}
														}
														formatOption = 4;
														flag = true;
													}
													else
													{
														if (this.DocItem.Slide[this.CurSlide, 0] == 103)
														{
															if (gf.PB_ShowHeadings[2] > 0)
															{
																text6 = gf.FolderLyricsHeading[this.DocItem.FolderNo, 2] + ((gf.FolderLyricsHeading[this.DocItem.FolderNo, 2] != "") ? " (2)" : "");
																tabNum = 2;
															}
															else
															{
																if (gf.PB_ShowHeadings[0] > 0)
																{
																	if (gf.PB_ShowHeadings[0] > 0 & this.DocItem.VersePresent[2])
																	{
																		tabNum = 2;
																	}
																	else
																	{
																		tabNum = 1;
																	}
																}
																else
																{
																	tabNum = 1;
																}
															}
															formatOption = 4;
															flag = true;
														}
														else
														{
															if (this.DocItem.Slide[this.CurSlide, 0] > 0)
															{
																if (gf.PB_ShowHeadings[0] > 0 & this.DocItem.VersePresent[2])
																{
																	if (this.DocItem.Slide[this.CurSlide, 0] != 101)
																	{
																		text6 = gf.VerseTitle[this.DocItem.Slide[this.CurSlide, 0]];
																	}
																	tabNum = 1;
																}
																else
																{
																	tabNum = 0;
																}
																formatOption = 3;
																flag = true;
															}
														}
													}
												}
											}
										}
									}
									if (flag)
									{
										if (text6.Length > 0)
										{
											text6 += "\t";
										}
										if (!this.ShowFirstLineOnly)
										{
											streamWriter.Write(this.AddtoRTF("", 0, formatOption, 0, 0, 0));
										}
									}
									else
									{
										if (gf.PB_ShowScreenBreaks > 0)
										{
											streamWriter.Write(this.AddtoRTF("", 0, formatOption, 0, 0, gf.PB_Spacing[0]));
										}
									}
									if (gf.PB_ShowSection == 0)
									{
										if (this.DocItem.Slide[this.CurSlide, 2] >= 0)
										{
											streamWriter.Write(this.AddtoRTF(text6, 0, formatOption, tabNum, text6.Length, gf.PB_Spacing[0], this.DocItem.Slide[this.CurSlide, 1], this.DocItem.Slide[this.CurSlide, 2]));
										}
									}
									else
									{
										if (gf.PB_ShowSection == 1)
										{
											if (this.DocItem.Slide[this.CurSlide, 4] >= 0)
											{
												streamWriter.Write(this.AddtoRTF(text6, 0, formatOption, tabNum, text6.Length, gf.PB_Spacing[0], this.DocItem.Slide[this.CurSlide, 3], this.DocItem.Slide[this.CurSlide, 4]));
											}
										}
										else
										{
											if (gf.PB_ShowSection == 2)
											{
												bool flag2 = false;
												if (this.DocItem.Slide[this.CurSlide, 2] >= 0)
												{
													streamWriter.Write(this.AddtoRTF(text6, 0, formatOption, tabNum, text6.Length, gf.PB_Spacing[0], this.DocItem.Slide[this.CurSlide, 1], this.DocItem.Slide[this.CurSlide, 2]));
													flag2 = true;
												}
												if (this.DocItem.Slide[this.CurSlide, 4] >= 0)
												{
													streamWriter.Write(this.AddtoRTF((!flag2) ? text6 : "", 1, formatOption, tabNum, (!flag2) ? text6.Length : 0, gf.PB_Spacing[0], this.DocItem.Slide[this.CurSlide, 3], this.DocItem.Slide[this.CurSlide, 4]));
												}
											}
										}
									}
									if (this.ShowFirstLineOnly)
									{
										j += num - 1;
									}
								}
							}
							streamWriter.Write(this.AddtoRTF("", 0, formatOption, 0, 0, gf.PB_Spacing[1] - 1));
							if (gf.PB_OneSongPerPage > 0)
							{
								streamWriter.Write("\\page ");
							}
						}
					}
					if (gf.PB_Layout == gf.PraiseBookLayout.PraiseBook)
					{
						if (gf.PB_OneSongPerPage < 1 && GenType == FrmGenerateDoc.DocGenType.Complete)
						{
							streamWriter.Write("\\page ");
						}
					}
					else
					{
						if (GenType == FrmGenerateDoc.DocGenType.Complete)
						{
							streamWriter.Write(this.AddtoRTF("", 0, 3, 0, 0, 0));
							streamWriter.Write(this.AddtoRTF("", 0, 3, 0, 0, 0));
						}
					}
					if (GenType == FrmGenerateDoc.DocGenType.Complete || GenType == FrmGenerateDoc.DocGenType.Index)
					{
						this.DocItem.FolderNo = this.SongFolderLog[0];
						streamWriter.Write(this.AddtoRTF("INDEX", 0, 0, 4, 0, 0));
						streamWriter.Write(this.AddtoRTF(gf.RTFIndent[3] + "\\tab", 0, 3, 0, 0, 0));
						if (gf.Left(gf.DocumentSongs[1, 3], 1) != " ")
						{
							streamWriter.Write(this.AddtoRTF(Convert.ToString(Convert.ToInt32(gf.DocumentSongs[1, 3])) + gf.RTFIndent[3] + "\\tab", 0, 3, 0, 0, 0));
						}
						string inString = ((gf.DocumentSongs[1, 2].Length < 4) ? (gf.DocumentSongs[1, 2] + " ") : gf.DocumentSongs[1, 2]) + gf.RTFIndent[3] + "\\tab " + ((gf.ExtractOneInfo(ref gf.DocumentSongs[1, 4], '>', false, false) == "") ? "1" : gf.ExtractOneInfo(ref gf.DocumentSongs[1, 4], '>', false, false));
						streamWriter.Write(this.AddtoRTF(inString, 0, 3, 0, 0, 0));
						for (int i = 2; i <= gf.TotalPraiseBookItems; i++)
						{
							if (gf.ExtractOneInfo(ref gf.DocumentSongs[i, 4], '>', false, false) == "")
							{
								if (gf.DocumentSongs[i, 3] != gf.DocumentSongs[i - 1, 3])
								{
									if (gf.Left(gf.DocumentSongs[i, 3], 1) == " ")
									{
										streamWriter.Write(this.AddtoRTF(gf.RTFIndent[3] + "\\tab", 0, 3, 0, 0, 0));
									}
									else
									{
										if (Convert.ToInt32(gf.DocumentSongs[i, 3]) < 17)
										{
											streamWriter.Write(this.AddtoRTF(gf.RTFIndent[3] + "\\tab", 0, 3, 0, 0, 0));
											streamWriter.Write(this.AddtoRTF(Convert.ToString(Convert.ToInt32(gf.DocumentSongs[i, 3])) + ((Convert.ToInt32(gf.DocumentSongs[i, 3]) == 16) ? "+" : "") + gf.RTFIndent[3] + "\\tab", 0, 3, 0, 0, 0));
										}
									}
								}
							}
							this.DocItem.FolderNo = this.SongFolderLog[i - 1];
							inString = ((gf.DocumentSongs[i, 2].Length < 4) ? (gf.DocumentSongs[i, 2] + " ") : gf.DocumentSongs[i, 2]) + gf.RTFIndent[3] + "\\tab " + ((gf.ExtractOneInfo(ref gf.DocumentSongs[1, 4], '>', false, false) == "") ? i.ToString() : gf.ExtractOneInfo(ref gf.DocumentSongs[i, 4], '>', false, false));
							streamWriter.Write(this.AddtoRTF(inString, 0, 3, 0, 0, 0));
						}
					}
					this.ProgressBar1.Value = 100;
					streamWriter.Write("}");
					streamWriter.Flush();
					streamWriter.Close();
					result = true;
				}
				catch
				{
					if (streamWriter != null)
					{
						streamWriter.Flush();
					}
					if (streamWriter != null)
					{
						streamWriter.Close();
					}
					MessageBox.Show("Error generating document " + gf.PB_FullFileName + ". The document might be opened - please close it first!");
					result = false;
				}
			}
			catch
			{
				MessageBox.Show("Error generating document " + gf.PB_FullFileName + ". The document might be opened - please close it first!");
				result = false;
			}
			return result;
		}
		private string BuildRTFHeader()
		{
			string str = this.OptPageSize0.Checked ? "\\pgwsxn11906\\pghsxn16838" : "\\pgwsxn12240\\pghsxn15840";
			string str2 = "{\\rtf1\\ansi" + str + "\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Microsoft Sans Serif;}";
			string text = "";
			string text2 = "{\\colortbl ;";
			string str3 = "\\viewkind1\\uc1\\pard\\f0\\fs17 ";
			for (int i = 1; i <= 81; i++)
			{
				this.FList[i] = "";
			}
			this.FList[0] = gf.ShowFontName[1, 0];
			this.RichTextBox1.Text = "";
			int num = 1;
			for (int i = 1; i < 41; i++)
			{
				for (int j = 0; j <= 1; j++)
				{
					this.RichTextBox1.Focus();
					this.RichTextBox1.SelectionStart = this.RichTextBox1.Text.Length;
					this.RichTextBox1.SelectedText = ">";
					this.RichTextBox1.SelectionFont = new Font(gf.ShowFontName[i, j], 11f, FontStyle.Regular);
					bool flag = false;
					for (int k = 1; k <= num; k++)
					{
						if (this.FList[k] == gf.ShowFontName[i, j])
						{
							flag = true;
							this.FolderFNum[i, j] = k;
						}
					}
					if (!flag)
					{
						num++;
						this.FList[num] = gf.ShowFontName[i, j];
						this.FolderFNum[i, j] = num;
						string text3 = text;
						text = string.Concat(new string[]
						{
							text3,
							"{\\f",
							Convert.ToString(num),
							"\\fnil ",
							gf.ShowFontName[i, j],
							";}"
						});
					}
				}
			}
			text += "}";
			for (int l = 0; l < 6; l++)
			{
				text2 = text2 + "\\red" + gf.PB_WordsColour[l].R.ToString();
				text2 = text2 + "\\green" + gf.PB_WordsColour[l].G.ToString();
				text2 = text2 + "\\blue" + gf.PB_WordsColour[l].B.ToString() + ";";
			}
			text2 += "}";
			string str4 = str2 + text + text2 + str3;
			string str5 = "{\\footer\\fs16\\sectd\\footery400\\pard\\qr {\\i " + gf.PB_DocumentName + "\\par Caleb Church}{\\par }}";
			string result;
			if (gf.PB_ShowColumns == 1)
			{
				result = str4 + str5 + "\\margr900\\margl1300\\margt900\\margb1000";
			}
			else
			{
				result = str4 + str5 + "\\margr900\\margl1300\\margt900\\margb1000\\cols2\\colno1\\colw4500\\colsr750\\colno2\\colw4500";
			}
			return result;
		}
		private string AddtoRTF(string InString, int Section, int FormatOption, int TabNum, int HeadingText, int PreLineSpacing)
		{
			return this.AddtoRTF(InString, Section, FormatOption, TabNum, HeadingText, PreLineSpacing, -1);
		}
		private string AddtoRTF(string InString, int Section, int FormatOption, int TabNum, int HeadingText, int PreLineSpacing, int StartLoc)
		{
			return this.AddtoRTF(InString, Section, FormatOption, TabNum, HeadingText, PreLineSpacing, StartLoc, -1);
		}
		private string AddtoRTF(string InString, int Section, int FormatOption, int TabNum, int HeadingText, int PreLineSpacing, int StartLoc, int EndLoc)
		{
			int num = this.DocItem.FolderNo;
			if (this.BibleItem & Section == 1)
			{
				num = this.SongFolderNo2;
				Section = 0;
			}
			string text = "";
			string text2 = "";
			string text3 = "";
			if (InString == null)
			{
				InString = "";
			}
			string text4 = gf.RTFIndent[TabNum];
			if (TabNum > 0 & TabNum < 4)
			{
				text = gf.RTFTab;
			}
			else
			{
				if (TabNum == 5)
				{
					text = gf.RTFTab;
				}
			}
			FontStyle fontStyle = FontStyle.Regular;
			if (gf.PB_WordsBold[FormatOption] > 0)
			{
				fontStyle |= FontStyle.Bold;
			}
			if (gf.PB_WordsItalic[FormatOption] > 0)
			{
				fontStyle |= FontStyle.Italic;
			}
			if (gf.PB_WordsUnderline[FormatOption] > 0)
			{
				fontStyle |= FontStyle.Underline;
			}
			int num2 = gf.PB_WordsSize[5];
			FontStyle style = fontStyle | FontStyle.Italic;
			Font mainFont = new Font(this.FList[this.FolderFNum[num, Section]], (float)gf.PB_WordsSize[FormatOption], fontStyle);
			Font notationsFont = new Font(this.FList[this.FolderFNum[num, Section]], (float)num2, style);
			string str = "\\f" + Convert.ToString(this.FolderFNum[num, Section]);
			string text5 = "\\fs" + Convert.ToString(num2 * 2) + gf.FormatMode(5);
			bool flag = gf.FormatMode(5).IndexOf("\\ul ") >= 0;
			int transposeTo = 0;
			if (this.DocItem.Capo > 0)
			{
				transposeTo = gf.IncrementChord(ref this.DocItem.Capo, 0);
			}
			if (PreLineSpacing > 0)
			{
				for (int i = 1; i <= PreLineSpacing; i++)
				{
					str += gf.RTFNewLine;
				}
			}
			if (HeadingText == 0)
			{
				str += text;
			}
			string text6 = gf.RTFIndent[TabNum];
			text6 += gf.FormatMode(FormatOption);
			string text7 = "";
			string text8 = "";
			if (StartLoc >= 0 & EndLoc >= 0)
			{
				if (this.ShowFirstLineOnly)
				{
					EndLoc = StartLoc;
				}
				bool flag2 = false;
				for (int j = StartLoc; j <= EndLoc; j++)
				{
					if (this.DocItem.LyricsAndNotationsList.Items[j].SubItems[3].Text != "")
					{
						flag2 = true;
						j = EndLoc;
					}
				}
				for (int j = StartLoc; j <= EndLoc; j++)
				{
					text2 = this.DocItem.LyricsAndNotationsList.Items[j].SubItems[2].Text + (this.ShowFirstLineOnly ? " ..." : "");
					gf.SubstituteDashes(ref text2, gf.PB_ShowNotations);
					if (gf.PB_ShowNotations == 1)
					{
						text8 = this.DocItem.LyricsAndNotationsList.Items[j].SubItems[3].Text;
						if (flag2 & !this.ShowFirstLineOnly)
						{
							if (gf.PB_CapoZero == 1)
							{
								text8 = gf.TransposeOneNotationString(text8, transposeTo, -1);
							}
							else
							{
								if (this.InTransposeOffset > 0)
								{
									text8 = gf.TransposeOneNotationString(text8, this.InTransposeOffset, -1);
								}
							}
							gf.SubDivideTextAndNotations(text2, text8, mainFont, notationsFont, ref this.SubDivideList, this.MaxTextWidth - 400 - 200);
							InString += gf.FormatMode(FormatOption);
							for (int k = 0; k < this.SubDivideList.Items.Count; k++)
							{
								string text9 = this.SubDivideList.Items[k].SubItems[1].Text;
								if (flag)
								{
									string text10 = "";
									for (int l = 0; l < text9.Length; l++)
									{
										if (text9[l] == ' ')
										{
											if (l < 1 || text9[l - 1] != ' ')
											{
												text10 += "\\ulnone ";
											}
										}
										else
										{
											if (l > 0 && text9[l - 1] == ' ')
											{
												text10 += "\\ul ";
											}
										}
										text10 += text9[l].ToString();
									}
									text9 = text10;
								}
								string text11 = InString;
								InString = string.Concat(new string[]
								{
									text11,
									text5,
									text9,
									"\n",
									this.DummyNotationSym,
									gf.FormatMode(FormatOption),
									this.SubDivideList.Items[k].SubItems[0].Text,
									text3,
									"\n"
								});
							}
							if (gf.Right(InString, 1) == "\n")
							{
								InString = gf.Left(InString, InString.Length - 1);
							}
							InString = InString + text3 + "\n";
						}
						else
						{
							string text11 = InString;
							InString = string.Concat(new string[]
							{
								text11,
								gf.FormatMode(FormatOption),
								text2,
								text3,
								"\n"
							});
						}
					}
					else
					{
						string text11 = InString;
						InString = string.Concat(new string[]
						{
							text11,
							(text8 != "") ? (text8 + "\n") : "",
							gf.FormatMode(FormatOption),
							text2,
							text3,
							"\n"
						});
					}
				}
				InString = gf.TrimEnd(InString).Replace("\n", "\r\n");
			}
			for (int i = 0; i < InString.Length; i++)
			{
				string text12 = gf.Mid(InString, i, 1);
				if (text12 != "\r" & text12 != "\n")
				{
					int num3 = (int)((text12 == "") ? '\0' : text12[0]);
					if (num3 < 0)
					{
						num3 += 65536;
					}
					if (num3 > 255)
					{
						text7 = text7 + "\\u" + num3.ToString("00000") + "?";
					}
					else
					{
						text7 += text12;
					}
				}
				else
				{
					text7 += text12;
				}
			}
			InString = text7;
			text7 = text6;
			for (int i = 0; i < InString.Length; i++)
			{
				string text12 = gf.Mid(InString, i, 1);
				if (text12 == "\r")
				{
					if (this.ShowFirstLineOnly)
					{
						text7 = text7 + "\r\n" + text6;
						i = InString.Length;
					}
					else
					{
						if (i == InString.Length - 1)
						{
							text7 = text7 + "\r\n" + gf.RTFLineSpacing + text6;
						}
						else
						{
							string text13 = (gf.Mid(InString, i + 2, 1) == this.DummyNotationSym) ? gf.RTFNewLine : gf.RTFLineSpacing;
							string text11 = text7;
							text7 = string.Concat(new string[]
							{
								text11,
								"\r\n",
								text13,
								text,
								text6
							});
						}
					}
				}
				else
				{
					if (text12 != "\n" & text12 != this.DummyNotationSym)
					{
						text7 += text12;
					}
				}
			}
			return str + text7 + "\r\n" + gf.RTFNewLine;
		}
		private void LoadItem(ref gf.SongSettings InItem)
		{
			string text = gf.DocumentSongs[this.CurrentSong, 1];
			string inIDString = gf.DocumentSongs[this.CurrentSong, 0];
			this.BibleItem = false;
			gf.InitialiseIndividualData(ref InItem);
			if (text == "P")
			{
				InItem.Type = text;
				InItem.Title = gf.RTFCheck(gf.DocumentSongs[this.CurrentSong, 2]);
				InItem.CompleteLyrics = "(Powerpoint File)";
			}
			else
			{
				if (text == "D")
				{
					gf.LoadIndividualData(ref InItem, inIDString, "", 0);
				}
				else
				{
					if (text == "B")
					{
						string title = gf.DocumentSongs[this.CurrentSong, 2];
						this.BibleItem = true;
						gf.LoadIndividualData(ref InItem, inIDString, "", 0, ref title);
						InItem.CompleteLyrics = InItem.CompleteLyrics.Replace('\u0098'.ToString(), " ");
					}
					else
					{
						if (text == "T")
						{
							string title = gf.DocumentSongs[this.CurrentSong, 2];
							gf.LoadIndividualData(ref InItem, inIDString, "", 0, ref title);
						}
						else
						{
							if (text == "I")
							{
								string title = gf.DocumentSongs[this.CurrentSong, 2];
								gf.LoadIndividualData(ref InItem, inIDString, "", 0, ref title);
								InItem.Title = title;
							}
							else
							{
								if (text == "W")
								{
									string title = gf.DocumentSongs[this.CurrentSong, 2];
									gf.LoadIndividualData(ref InItem, inIDString, "", 0, ref title);
								}
							}
						}
					}
				}
			}
			InItem.Title = gf.RTFCheck(InItem.Title);
			InItem.Title2 = gf.RTFCheck(InItem.Title);
			InItem.CompleteLyrics = gf.RTFCheck(InItem.CompleteLyrics);
			InItem.Copyright = gf.RTFCheck(InItem.Writer + ((InItem.Writer != "" & InItem.Copyright != "") ? "; " : "") + InItem.Copyright);
			gf.SongSettings expr_245 = InItem;
			string copyright = expr_245.Copyright;
			expr_245.Copyright = string.Concat(new string[]
			{
				copyright,
				(InItem.Copyright == "") ? "" : " ",
				InItem.Show_LicAdminInfo1,
				(InItem.Show_LicAdminInfo1 == "") ? "" : " ",
				InItem.Show_LicAdminInfo2
			});
			gf.FormatDisplayLyrics(ref InItem, true, gf.PB_LyricsPattern > 0);
		}
		private string FormatNotationString(string InString, string InNotation, Font MainFont, Font NotationsFont)
		{
			Graphics graphics = base.CreateGraphics();
			string text = "i";
			int num = (int)graphics.MeasureString(text, NotationsFont, 1000, StringFormat.GenericTypographic).Width;
			string text2 = text;
			string text3 = "";
			int num2 = 0;
			string text4 = gf.ExtractOneInfo(ref InNotation, ';');
			string text5 = gf.ExtractOneInfo(ref InNotation, ';');
			while (text4 != "-1" & text5 != "-1")
			{
				string text6 = gf.Left(InString, Convert.ToInt32(text5));
				if (gf.Right(text6, 1) == " ")
				{
					text6 = gf.Left(text6, text6.Length - 1) + text;
				}
				int num3 = (int)graphics.MeasureString(text6, MainFont, 32000, StringFormat.GenericDefault).Width;
				while (graphics.MeasureString(text2, NotationsFont, 32000, StringFormat.GenericDefault).Width < (float)(num3 + num))
				{
					text2 = gf.Left(text2, text2.Length - 1) + " " + text;
					num2++;
				}
				text2 = gf.Left(text2, text2.Length - 1) + text4 + text;
				if (gf.PB_PrinterSpaces > 0)
				{
					int num4 = num2 / 12;
					for (int i = 1; i <= num2 + num4; i++)
					{
						text3 += " ";
					}
					text3 += text4;
				}
				num2 = 0;
				text4 = gf.ExtractOneInfo(ref InNotation, ';');
				text5 = gf.ExtractOneInfo(ref InNotation, ';');
			}
			if (gf.Right(text2, 1) == text)
			{
				text2 = gf.Left(text2, text2.Length - 1);
			}
			string result;
			if (text2 != "")
			{
				if (gf.PB_PrinterSpaces > 0)
				{
					result = text3;
				}
				else
				{
					result = text2;
				}
			}
			else
			{
				result = " ";
			}
			return result;
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            this.groupBox5 = new System.Windows.Forms.GroupBox();
            this.OptShowColumns2 = new System.Windows.Forms.RadioButton();
            this.OptShowColumns1 = new System.Windows.Forms.RadioButton();
            this.groupBox7 = new System.Windows.Forms.GroupBox();
            this.optOneSongPerPage = new System.Windows.Forms.CheckBox();
            this.optNewScreen = new System.Windows.Forms.CheckBox();
            this.panel6 = new System.Windows.Forms.Panel();
            this.tbSpacing1 = new System.Windows.Forms.NumericUpDown();
            this.label6 = new System.Windows.Forms.Label();
            this.panel7 = new System.Windows.Forms.Panel();
            this.tbSpacing0 = new System.Windows.Forms.NumericUpDown();
            this.label7 = new System.Windows.Forms.Label();
            this.groupBox6 = new System.Windows.Forms.GroupBox();
            this.OptLyricsPattern1 = new System.Windows.Forms.RadioButton();
            this.OptLyricsPattern0 = new System.Windows.Forms.RadioButton();
            this.optCapoZero = new System.Windows.Forms.CheckBox();
            this.optShowTiming = new System.Windows.Forms.CheckBox();
            this.optPrinterSpaces = new System.Windows.Forms.CheckBox();
            this.optShowCapo = new System.Windows.Forms.CheckBox();
            this.optShowKey = new System.Windows.Forms.CheckBox();
            this.optWords5 = new System.Windows.Forms.CheckBox();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.OptShowSection1 = new System.Windows.Forms.RadioButton();
            this.OptShowSection0 = new System.Windows.Forms.RadioButton();
            this.OptShowSection2 = new System.Windows.Forms.RadioButton();
            this.BtnSaveExit = new System.Windows.Forms.Button();
            this.BtnCancel = new System.Windows.Forms.Button();
            this.BtnOK = new System.Windows.Forms.Button();
            this.Mess1 = new System.Windows.Forms.Label();
            this.ProgressBar1 = new System.Windows.Forms.ProgressBar();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.optHeadings3 = new System.Windows.Forms.CheckBox();
            this.optWords7 = new System.Windows.Forms.CheckBox();
            this.optHeadings2 = new System.Windows.Forms.CheckBox();
            this.optHeadings1 = new System.Windows.Forms.CheckBox();
            this.optHeadings0 = new System.Windows.Forms.CheckBox();
            this.optWords6 = new System.Windows.Forms.CheckBox();
            this.optWords2 = new System.Windows.Forms.CheckBox();
            this.optWords1 = new System.Windows.Forms.CheckBox();
            this.optWords0 = new System.Windows.Forms.CheckBox();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.panel8 = new System.Windows.Forms.Panel();
            this.PanelFontColour5 = new System.Windows.Forms.Panel();
            this.tbFontSize5 = new System.Windows.Forms.NumericUpDown();
            this.toolStripFont5 = new System.Windows.Forms.ToolStrip();
            this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton9 = new System.Windows.Forms.ToolStripButton();
            this.label8 = new System.Windows.Forms.Label();
            this.panel5 = new System.Windows.Forms.Panel();
            this.PanelFontColour4 = new System.Windows.Forms.Panel();
            this.tbFontSize4 = new System.Windows.Forms.NumericUpDown();
            this.toolStripFont4 = new System.Windows.Forms.ToolStrip();
            this.toolStripButton14 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton15 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton16 = new System.Windows.Forms.ToolStripButton();
            this.label5 = new System.Windows.Forms.Label();
            this.panel4 = new System.Windows.Forms.Panel();
            this.PanelFontColour3 = new System.Windows.Forms.Panel();
            this.tbFontSize3 = new System.Windows.Forms.NumericUpDown();
            this.toolStripFont3 = new System.Windows.Forms.ToolStrip();
            this.toolStripButton10 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton11 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton12 = new System.Windows.Forms.ToolStripButton();
            this.label4 = new System.Windows.Forms.Label();
            this.panel3 = new System.Windows.Forms.Panel();
            this.PanelFontColour2 = new System.Windows.Forms.Panel();
            this.tbFontSize2 = new System.Windows.Forms.NumericUpDown();
            this.toolStripFont2 = new System.Windows.Forms.ToolStrip();
            this.toolStripButton6 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton7 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton8 = new System.Windows.Forms.ToolStripButton();
            this.label3 = new System.Windows.Forms.Label();
            this.panel2 = new System.Windows.Forms.Panel();
            this.PanelFontColour1 = new System.Windows.Forms.Panel();
            this.tbFontSize1 = new System.Windows.Forms.NumericUpDown();
            this.toolStripFont1 = new System.Windows.Forms.ToolStrip();
            this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
            this.label2 = new System.Windows.Forms.Label();
            this.panel1 = new System.Windows.Forms.Panel();
            this.PanelFontColour0 = new System.Windows.Forms.Panel();
            this.tbFontSize0 = new System.Windows.Forms.NumericUpDown();
            this.toolStripFont0 = new System.Windows.Forms.ToolStrip();
            this.toolStripButton100 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton101 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton102 = new System.Windows.Forms.ToolStripButton();
            this.label1 = new System.Windows.Forms.Label();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.BtnIndexOnly = new System.Windows.Forms.Button();
            this.BtnTitlesRef = new System.Windows.Forms.Button();
            this.groupBox4 = new System.Windows.Forms.GroupBox();
            this.OptPageSize1 = new System.Windows.Forms.RadioButton();
            this.OptPageSize0 = new System.Windows.Forms.RadioButton();
            this.groupBox5.SuspendLayout();
            this.groupBox7.SuspendLayout();
            this.panel6.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbSpacing1)).BeginInit();
            this.panel7.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbSpacing0)).BeginInit();
            this.groupBox6.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.groupBox1.SuspendLayout();
            this.panel8.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize5)).BeginInit();
            this.toolStripFont5.SuspendLayout();
            this.panel5.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize4)).BeginInit();
            this.toolStripFont4.SuspendLayout();
            this.panel4.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize3)).BeginInit();
            this.toolStripFont3.SuspendLayout();
            this.panel3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize2)).BeginInit();
            this.toolStripFont2.SuspendLayout();
            this.panel2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize1)).BeginInit();
            this.toolStripFont1.SuspendLayout();
            this.panel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize0)).BeginInit();
            this.toolStripFont0.SuspendLayout();
            this.groupBox4.SuspendLayout();
            this.SuspendLayout();
            // 
            // groupBox5
            // 
            this.groupBox5.Controls.Add(this.OptShowColumns2);
            this.groupBox5.Controls.Add(this.OptShowColumns1);
            this.groupBox5.Location = new System.Drawing.Point(98, 229);
            this.groupBox5.Name = "groupBox5";
            this.groupBox5.Size = new System.Drawing.Size(70, 64);
            this.groupBox5.TabIndex = 2;
            this.groupBox5.TabStop = false;
            this.groupBox5.Text = "Columns";
            // 
            // OptShowColumns2
            // 
            this.OptShowColumns2.AutoSize = true;
            this.OptShowColumns2.Location = new System.Drawing.Point(6, 38);
            this.OptShowColumns2.Name = "OptShowColumns2";
            this.OptShowColumns2.Size = new System.Drawing.Size(59, 17);
            this.OptShowColumns2.TabIndex = 1;
            this.OptShowColumns2.Text = "Double";
            // 
            // OptShowColumns1
            // 
            this.OptShowColumns1.AutoSize = true;
            this.OptShowColumns1.Location = new System.Drawing.Point(6, 18);
            this.OptShowColumns1.Name = "OptShowColumns1";
            this.OptShowColumns1.Size = new System.Drawing.Size(54, 17);
            this.OptShowColumns1.TabIndex = 0;
            this.OptShowColumns1.Text = "Single";
            // 
            // groupBox7
            // 
            this.groupBox7.Controls.Add(this.optOneSongPerPage);
            this.groupBox7.Controls.Add(this.optNewScreen);
            this.groupBox7.Controls.Add(this.panel6);
            this.groupBox7.Controls.Add(this.panel7);
            this.groupBox7.Location = new System.Drawing.Point(241, 184);
            this.groupBox7.Name = "groupBox7";
            this.groupBox7.Size = new System.Drawing.Size(222, 109);
            this.groupBox7.TabIndex = 5;
            this.groupBox7.TabStop = false;
            this.groupBox7.Text = "Line Spacing";
            // 
            // optOneSongPerPage
            // 
            this.optOneSongPerPage.AutoSize = true;
            this.optOneSongPerPage.BackColor = System.Drawing.Color.Transparent;
            this.optOneSongPerPage.Location = new System.Drawing.Point(11, 86);
            this.optOneSongPerPage.Name = "optOneSongPerPage";
            this.optOneSongPerPage.Size = new System.Drawing.Size(120, 17);
            this.optOneSongPerPage.TabIndex = 1;
            this.optOneSongPerPage.Text = "One Song per Page";
            this.optOneSongPerPage.UseVisualStyleBackColor = false;
            // 
            // optNewScreen
            // 
            this.optNewScreen.AutoSize = true;
            this.optNewScreen.BackColor = System.Drawing.Color.Transparent;
            this.optNewScreen.Location = new System.Drawing.Point(11, 67);
            this.optNewScreen.Name = "optNewScreen";
            this.optNewScreen.Size = new System.Drawing.Size(204, 17);
            this.optNewScreen.TabIndex = 0;
            this.optNewScreen.Text = "One blank line for each Screen Break";
            this.optNewScreen.UseVisualStyleBackColor = false;
            // 
            // panel6
            // 
            this.panel6.Controls.Add(this.tbSpacing1);
            this.panel6.Controls.Add(this.label6);
            this.panel6.Location = new System.Drawing.Point(10, 41);
            this.panel6.Name = "panel6";
            this.panel6.Size = new System.Drawing.Size(204, 25);
            this.panel6.TabIndex = 3;
            // 
            // tbSpacing1
            // 
            this.tbSpacing1.Location = new System.Drawing.Point(161, 3);
            this.tbSpacing1.Name = "tbSpacing1";
            this.tbSpacing1.Size = new System.Drawing.Size(38, 20);
            this.tbSpacing1.TabIndex = 0;
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(3, 5);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(107, 13);
            this.label6.TabIndex = 0;
            this.label6.Text = "Between each Song:";
            // 
            // panel7
            // 
            this.panel7.Controls.Add(this.tbSpacing0);
            this.panel7.Controls.Add(this.label7);
            this.panel7.Location = new System.Drawing.Point(10, 17);
            this.panel7.Name = "panel7";
            this.panel7.Size = new System.Drawing.Size(204, 25);
            this.panel7.TabIndex = 2;
            // 
            // tbSpacing0
            // 
            this.tbSpacing0.Location = new System.Drawing.Point(161, 3);
            this.tbSpacing0.Name = "tbSpacing0";
            this.tbSpacing0.Size = new System.Drawing.Size(38, 20);
            this.tbSpacing0.TabIndex = 0;
            // 
            // label7
            // 
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(3, 5);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(102, 13);
            this.label7.TabIndex = 0;
            this.label7.Text = "Between each Line:";
            // 
            // groupBox6
            // 
            this.groupBox6.Controls.Add(this.OptLyricsPattern1);
            this.groupBox6.Controls.Add(this.OptLyricsPattern0);
            this.groupBox6.Location = new System.Drawing.Point(7, 229);
            this.groupBox6.Name = "groupBox6";
            this.groupBox6.Size = new System.Drawing.Size(86, 64);
            this.groupBox6.TabIndex = 3;
            this.groupBox6.TabStop = false;
            this.groupBox6.Text = "Lyrics Pattern";
            // 
            // OptLyricsPattern1
            // 
            this.OptLyricsPattern1.AutoSize = true;
            this.OptLyricsPattern1.Location = new System.Drawing.Point(6, 38);
            this.OptLyricsPattern1.Name = "OptLyricsPattern1";
            this.OptLyricsPattern1.Size = new System.Drawing.Size(74, 17);
            this.OptLyricsPattern1.TabIndex = 1;
            this.OptLyricsPattern1.Text = "Sequence";
            // 
            // OptLyricsPattern0
            // 
            this.OptLyricsPattern0.AutoSize = true;
            this.OptLyricsPattern0.Location = new System.Drawing.Point(7, 18);
            this.OptLyricsPattern0.Name = "OptLyricsPattern0";
            this.OptLyricsPattern0.Size = new System.Drawing.Size(51, 17);
            this.OptLyricsPattern0.TabIndex = 0;
            this.OptLyricsPattern0.Text = "Basic";
            // 
            // optCapoZero
            // 
            this.optCapoZero.AutoSize = true;
            this.optCapoZero.BackColor = System.Drawing.Color.Transparent;
            this.optCapoZero.Location = new System.Drawing.Point(86, 71);
            this.optCapoZero.Name = "optCapoZero";
            this.optCapoZero.Size = new System.Drawing.Size(60, 17);
            this.optCapoZero.TabIndex = 8;
            this.optCapoZero.Text = "Capo 0";
            this.optCapoZero.UseVisualStyleBackColor = false;
            // 
            // optShowTiming
            // 
            this.optShowTiming.AutoSize = true;
            this.optShowTiming.BackColor = System.Drawing.Color.Transparent;
            this.optShowTiming.Location = new System.Drawing.Point(158, 70);
            this.optShowTiming.Name = "optShowTiming";
            this.optShowTiming.Size = new System.Drawing.Size(57, 17);
            this.optShowTiming.TabIndex = 11;
            this.optShowTiming.Text = "Timing";
            this.optShowTiming.UseVisualStyleBackColor = false;
            // 
            // optPrinterSpaces
            // 
            this.optPrinterSpaces.AutoSize = true;
            this.optPrinterSpaces.BackColor = System.Drawing.Color.Transparent;
            this.optPrinterSpaces.Location = new System.Drawing.Point(116, 142);
            this.optPrinterSpaces.Name = "optPrinterSpaces";
            this.optPrinterSpaces.Size = new System.Drawing.Size(95, 17);
            this.optPrinterSpaces.TabIndex = 13;
            this.optPrinterSpaces.Text = "Printer Spaces";
            this.toolTip1.SetToolTip(this.optPrinterSpaces, "Add Printer Spaces");
            this.optPrinterSpaces.UseVisualStyleBackColor = false;
            // 
            // optShowCapo
            // 
            this.optShowCapo.AutoSize = true;
            this.optShowCapo.BackColor = System.Drawing.Color.Transparent;
            this.optShowCapo.Location = new System.Drawing.Point(158, 21);
            this.optShowCapo.Name = "optShowCapo";
            this.optShowCapo.Size = new System.Drawing.Size(51, 17);
            this.optShowCapo.TabIndex = 9;
            this.optShowCapo.Text = "Capo";
            this.optShowCapo.UseVisualStyleBackColor = false;
            // 
            // optShowKey
            // 
            this.optShowKey.AutoSize = true;
            this.optShowKey.BackColor = System.Drawing.Color.Transparent;
            this.optShowKey.Location = new System.Drawing.Point(158, 45);
            this.optShowKey.Name = "optShowKey";
            this.optShowKey.Size = new System.Drawing.Size(44, 17);
            this.optShowKey.TabIndex = 10;
            this.optShowKey.Text = "Key";
            this.optShowKey.UseVisualStyleBackColor = false;
            // 
            // optWords5
            // 
            this.optWords5.AutoSize = true;
            this.optWords5.BackColor = System.Drawing.Color.Transparent;
            this.optWords5.Location = new System.Drawing.Point(10, 142);
            this.optWords5.Name = "optWords5";
            this.optWords5.Size = new System.Drawing.Size(71, 17);
            this.optWords5.TabIndex = 5;
            this.optWords5.Text = "Notations";
            this.optWords5.UseVisualStyleBackColor = false;
            // 
            // groupBox3
            // 
            this.groupBox3.Controls.Add(this.OptShowSection1);
            this.groupBox3.Controls.Add(this.OptShowSection0);
            this.groupBox3.Controls.Add(this.OptShowSection2);
            this.groupBox3.Location = new System.Drawing.Point(7, 183);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(228, 43);
            this.groupBox3.TabIndex = 1;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "Regions";
            // 
            // OptShowSection1
            // 
            this.OptShowSection1.AutoSize = true;
            this.OptShowSection1.Location = new System.Drawing.Point(150, 19);
            this.OptShowSection1.Name = "OptShowSection1";
            this.OptShowSection1.Size = new System.Drawing.Size(68, 17);
            this.OptShowSection1.TabIndex = 2;
            this.OptShowSection1.Text = "Region 2";
            // 
            // OptShowSection0
            // 
            this.OptShowSection0.AutoSize = true;
            this.OptShowSection0.Location = new System.Drawing.Point(71, 19);
            this.OptShowSection0.Name = "OptShowSection0";
            this.OptShowSection0.Size = new System.Drawing.Size(68, 17);
            this.OptShowSection0.TabIndex = 1;
            this.OptShowSection0.Text = "Region 1";
            // 
            // OptShowSection2
            // 
            this.OptShowSection2.AutoSize = true;
            this.OptShowSection2.Location = new System.Drawing.Point(8, 19);
            this.OptShowSection2.Name = "OptShowSection2";
            this.OptShowSection2.Size = new System.Drawing.Size(47, 17);
            this.OptShowSection2.TabIndex = 0;
            this.OptShowSection2.Text = "Both";
            // 
            // BtnSaveExit
            // 
            this.BtnSaveExit.Location = new System.Drawing.Point(6, 334);
            this.BtnSaveExit.Name = "BtnSaveExit";
            this.BtnSaveExit.Size = new System.Drawing.Size(83, 24);
            this.BtnSaveExit.TabIndex = 6;
            this.BtnSaveExit.Text = "Save && Close";
            this.BtnSaveExit.Click += new System.EventHandler(this.BtnSaveExit_Click);
            // 
            // BtnCancel
            // 
            this.BtnCancel.Location = new System.Drawing.Point(383, 334);
            this.BtnCancel.Name = "BtnCancel";
            this.BtnCancel.Size = new System.Drawing.Size(80, 24);
            this.BtnCancel.TabIndex = 9;
            this.BtnCancel.Text = "Close";
            this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
            // 
            // BtnOK
            // 
            this.BtnOK.Location = new System.Drawing.Point(297, 334);
            this.BtnOK.Name = "BtnOK";
            this.BtnOK.Size = new System.Drawing.Size(80, 24);
            this.BtnOK.TabIndex = 8;
            this.BtnOK.Text = "Generate";
            this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
            // 
            // Mess1
            // 
            this.Mess1.BackColor = System.Drawing.SystemColors.Control;
            this.Mess1.Location = new System.Drawing.Point(12, 312);
            this.Mess1.Name = "Mess1";
            this.Mess1.Size = new System.Drawing.Size(448, 13);
            this.Mess1.TabIndex = 39;
            // 
            // ProgressBar1
            // 
            this.ProgressBar1.Location = new System.Drawing.Point(6, 308);
            this.ProgressBar1.Name = "ProgressBar1";
            this.ProgressBar1.Size = new System.Drawing.Size(457, 21);
            this.ProgressBar1.Step = 1;
            this.ProgressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
            this.ProgressBar1.TabIndex = 38;
            // 
            // groupBox2
            // 
            this.groupBox2.Controls.Add(this.optHeadings3);
            this.groupBox2.Controls.Add(this.optCapoZero);
            this.groupBox2.Controls.Add(this.optWords7);
            this.groupBox2.Controls.Add(this.optShowTiming);
            this.groupBox2.Controls.Add(this.optHeadings2);
            this.groupBox2.Controls.Add(this.optPrinterSpaces);
            this.groupBox2.Controls.Add(this.optHeadings1);
            this.groupBox2.Controls.Add(this.optShowCapo);
            this.groupBox2.Controls.Add(this.optHeadings0);
            this.groupBox2.Controls.Add(this.optShowKey);
            this.groupBox2.Controls.Add(this.optWords6);
            this.groupBox2.Controls.Add(this.optWords5);
            this.groupBox2.Controls.Add(this.optWords2);
            this.groupBox2.Controls.Add(this.optWords1);
            this.groupBox2.Controls.Add(this.optWords0);
            this.groupBox2.Location = new System.Drawing.Point(241, 8);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(222, 171);
            this.groupBox2.TabIndex = 4;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Show Details";
            // 
            // optHeadings3
            // 
            this.optHeadings3.AutoSize = true;
            this.optHeadings3.BackColor = System.Drawing.Color.Transparent;
            this.optHeadings3.Location = new System.Drawing.Point(116, 94);
            this.optHeadings3.Name = "optHeadings3";
            this.optHeadings3.Size = new System.Drawing.Size(107, 17);
            this.optHeadings3.TabIndex = 14;
            this.optHeadings3.Text = "PreChorus Head.";
            this.optHeadings3.UseVisualStyleBackColor = false;
            // 
            // optWords7
            // 
            this.optWords7.AutoSize = true;
            this.optWords7.BackColor = System.Drawing.Color.Transparent;
            this.optWords7.Location = new System.Drawing.Point(86, 46);
            this.optWords7.Name = "optWords7";
            this.optWords7.Size = new System.Drawing.Size(68, 17);
            this.optWords7.TabIndex = 7;
            this.optWords7.Text = "User Ref";
            this.optWords7.UseVisualStyleBackColor = false;
            // 
            // optHeadings2
            // 
            this.optHeadings2.AutoSize = true;
            this.optHeadings2.BackColor = System.Drawing.Color.Transparent;
            this.optHeadings2.Location = new System.Drawing.Point(116, 118);
            this.optHeadings2.Name = "optHeadings2";
            this.optHeadings2.Size = new System.Drawing.Size(99, 17);
            this.optHeadings2.TabIndex = 12;
            this.optHeadings2.Text = "Bridge Heading";
            this.optHeadings2.UseVisualStyleBackColor = false;
            // 
            // optHeadings1
            // 
            this.optHeadings1.AutoSize = true;
            this.optHeadings1.BackColor = System.Drawing.Color.Transparent;
            this.optHeadings1.Location = new System.Drawing.Point(10, 118);
            this.optHeadings1.Name = "optHeadings1";
            this.optHeadings1.Size = new System.Drawing.Size(102, 17);
            this.optHeadings1.TabIndex = 4;
            this.optHeadings1.Text = "Chorus Heading";
            this.optHeadings1.UseVisualStyleBackColor = false;
            // 
            // optHeadings0
            // 
            this.optHeadings0.AutoSize = true;
            this.optHeadings0.BackColor = System.Drawing.Color.Transparent;
            this.optHeadings0.Location = new System.Drawing.Point(10, 94);
            this.optHeadings0.Name = "optHeadings0";
            this.optHeadings0.Size = new System.Drawing.Size(96, 17);
            this.optHeadings0.TabIndex = 3;
            this.optHeadings0.Text = "Verse Heading";
            this.optHeadings0.UseVisualStyleBackColor = false;
            // 
            // optWords6
            // 
            this.optWords6.AutoSize = true;
            this.optWords6.BackColor = System.Drawing.Color.Transparent;
            this.optWords6.Location = new System.Drawing.Point(86, 22);
            this.optWords6.Name = "optWords6";
            this.optWords6.Size = new System.Drawing.Size(71, 17);
            this.optWords6.TabIndex = 6;
            this.optWords6.Text = "Book Ref";
            this.optWords6.UseVisualStyleBackColor = false;
            // 
            // optWords2
            // 
            this.optWords2.AutoSize = true;
            this.optWords2.BackColor = System.Drawing.Color.Transparent;
            this.optWords2.Location = new System.Drawing.Point(10, 70);
            this.optWords2.Name = "optWords2";
            this.optWords2.Size = new System.Drawing.Size(70, 17);
            this.optWords2.TabIndex = 2;
            this.optWords2.Text = "Copyright";
            this.optWords2.UseVisualStyleBackColor = false;
            // 
            // optWords1
            // 
            this.optWords1.AutoSize = true;
            this.optWords1.BackColor = System.Drawing.Color.Transparent;
            this.optWords1.Location = new System.Drawing.Point(10, 46);
            this.optWords1.Name = "optWords1";
            this.optWords1.Size = new System.Drawing.Size(74, 17);
            this.optWords1.TabIndex = 1;
            this.optWords1.Text = "Song Title";
            this.optWords1.UseVisualStyleBackColor = false;
            // 
            // optWords0
            // 
            this.optWords0.AutoSize = true;
            this.optWords0.BackColor = System.Drawing.Color.Transparent;
            this.optWords0.Location = new System.Drawing.Point(10, 22);
            this.optWords0.Name = "optWords0";
            this.optWords0.Size = new System.Drawing.Size(71, 17);
            this.optWords0.TabIndex = 0;
            this.optWords0.Text = "Song No.";
            this.optWords0.UseVisualStyleBackColor = false;
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.panel8);
            this.groupBox1.Controls.Add(this.panel5);
            this.groupBox1.Controls.Add(this.panel4);
            this.groupBox1.Controls.Add(this.panel3);
            this.groupBox1.Controls.Add(this.panel2);
            this.groupBox1.Controls.Add(this.panel1);
            this.groupBox1.Location = new System.Drawing.Point(7, 8);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(228, 171);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Font Size";
            // 
            // panel8
            // 
            this.panel8.Controls.Add(this.PanelFontColour5);
            this.panel8.Controls.Add(this.tbFontSize5);
            this.panel8.Controls.Add(this.toolStripFont5);
            this.panel8.Controls.Add(this.label8);
            this.panel8.Location = new System.Drawing.Point(10, 137);
            this.panel8.Name = "panel8";
            this.panel8.Size = new System.Drawing.Size(210, 25);
            this.panel8.TabIndex = 5;
            // 
            // PanelFontColour5
            // 
            this.PanelFontColour5.BackColor = System.Drawing.Color.Black;
            this.PanelFontColour5.Cursor = System.Windows.Forms.Cursors.Hand;
            this.PanelFontColour5.Location = new System.Drawing.Point(192, 4);
            this.PanelFontColour5.Name = "PanelFontColour5";
            this.PanelFontColour5.Size = new System.Drawing.Size(16, 18);
            this.PanelFontColour5.TabIndex = 2;
            this.PanelFontColour5.Tag = "5";
            this.toolTip1.SetToolTip(this.PanelFontColour5, "Set Notations Colour");
            this.PanelFontColour5.Click += new System.EventHandler(this.PanelFontColour_Click);
            // 
            // tbFontSize5
            // 
            this.tbFontSize5.Location = new System.Drawing.Point(150, 3);
            this.tbFontSize5.Name = "tbFontSize5";
            this.tbFontSize5.Size = new System.Drawing.Size(38, 20);
            this.tbFontSize5.TabIndex = 1;
            // 
            // toolStripFont5
            // 
            this.toolStripFont5.AutoSize = false;
            this.toolStripFont5.CanOverflow = false;
            this.toolStripFont5.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripFont5.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripFont5.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripButton1,
            this.toolStripButton5,
            this.toolStripButton9});
            this.toolStripFont5.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStripFont5.Location = new System.Drawing.Point(75, 0);
            this.toolStripFont5.Name = "toolStripFont5";
            this.toolStripFont5.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripFont5.Size = new System.Drawing.Size(71, 26);
            this.toolStripFont5.TabIndex = 0;
            // 
            // toolStripButton1
            // 
            this.toolStripButton1.CheckOnClick = true;
            this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton1.Image = global::Properties.Resources.bold1;
            this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton1.Name = "toolStripButton1";
            this.toolStripButton1.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton1.Tag = "0";
            // 
            // toolStripButton5
            // 
            this.toolStripButton5.CheckOnClick = true;
            this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton5.Image = global::Properties.Resources.italic;
            this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton5.Name = "toolStripButton5";
            this.toolStripButton5.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton5.Tag = "1";
            // 
            // toolStripButton9
            // 
            this.toolStripButton9.CheckOnClick = true;
            this.toolStripButton9.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton9.Image = global::Properties.Resources.underline;
            this.toolStripButton9.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton9.Name = "toolStripButton9";
            this.toolStripButton9.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton9.Tag = "2";
            // 
            // label8
            // 
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(3, 5);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(55, 13);
            this.label8.TabIndex = 0;
            this.label8.Text = "Notations:";
            // 
            // panel5
            // 
            this.panel5.Controls.Add(this.PanelFontColour4);
            this.panel5.Controls.Add(this.tbFontSize4);
            this.panel5.Controls.Add(this.toolStripFont4);
            this.panel5.Controls.Add(this.label5);
            this.panel5.Location = new System.Drawing.Point(10, 113);
            this.panel5.Name = "panel5";
            this.panel5.Size = new System.Drawing.Size(210, 25);
            this.panel5.TabIndex = 4;
            // 
            // PanelFontColour4
            // 
            this.PanelFontColour4.BackColor = System.Drawing.Color.Black;
            this.PanelFontColour4.Cursor = System.Windows.Forms.Cursors.Hand;
            this.PanelFontColour4.Location = new System.Drawing.Point(192, 4);
            this.PanelFontColour4.Name = "PanelFontColour4";
            this.PanelFontColour4.Size = new System.Drawing.Size(16, 18);
            this.PanelFontColour4.TabIndex = 2;
            this.PanelFontColour4.Tag = "4";
            this.toolTip1.SetToolTip(this.PanelFontColour4, "Set Chorus/Bridge Colour");
            this.PanelFontColour4.Click += new System.EventHandler(this.PanelFontColour_Click);
            // 
            // tbFontSize4
            // 
            this.tbFontSize4.Location = new System.Drawing.Point(150, 3);
            this.tbFontSize4.Name = "tbFontSize4";
            this.tbFontSize4.Size = new System.Drawing.Size(38, 20);
            this.tbFontSize4.TabIndex = 1;
            // 
            // toolStripFont4
            // 
            this.toolStripFont4.AutoSize = false;
            this.toolStripFont4.CanOverflow = false;
            this.toolStripFont4.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripFont4.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripFont4.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripButton14,
            this.toolStripButton15,
            this.toolStripButton16});
            this.toolStripFont4.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStripFont4.Location = new System.Drawing.Point(75, 0);
            this.toolStripFont4.Name = "toolStripFont4";
            this.toolStripFont4.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripFont4.Size = new System.Drawing.Size(71, 26);
            this.toolStripFont4.TabIndex = 0;
            // 
            // toolStripButton14
            // 
            this.toolStripButton14.CheckOnClick = true;
            this.toolStripButton14.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton14.Image = global::Properties.Resources.bold1;
            this.toolStripButton14.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton14.Name = "toolStripButton14";
            this.toolStripButton14.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton14.Tag = "0";
            // 
            // toolStripButton15
            // 
            this.toolStripButton15.CheckOnClick = true;
            this.toolStripButton15.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton15.Image = global::Properties.Resources.italic;
            this.toolStripButton15.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton15.Name = "toolStripButton15";
            this.toolStripButton15.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton15.Tag = "1";
            // 
            // toolStripButton16
            // 
            this.toolStripButton16.CheckOnClick = true;
            this.toolStripButton16.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton16.Image = global::Properties.Resources.underline;
            this.toolStripButton16.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton16.Name = "toolStripButton16";
            this.toolStripButton16.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton16.Tag = "2";
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(3, 5);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(78, 13);
            this.label5.TabIndex = 0;
            this.label5.Text = "Chorus/Bridge:";
            // 
            // panel4
            // 
            this.panel4.Controls.Add(this.PanelFontColour3);
            this.panel4.Controls.Add(this.tbFontSize3);
            this.panel4.Controls.Add(this.toolStripFont3);
            this.panel4.Controls.Add(this.label4);
            this.panel4.Location = new System.Drawing.Point(10, 89);
            this.panel4.Name = "panel4";
            this.panel4.Size = new System.Drawing.Size(210, 25);
            this.panel4.TabIndex = 3;
            // 
            // PanelFontColour3
            // 
            this.PanelFontColour3.BackColor = System.Drawing.Color.Black;
            this.PanelFontColour3.Cursor = System.Windows.Forms.Cursors.Hand;
            this.PanelFontColour3.Location = new System.Drawing.Point(192, 4);
            this.PanelFontColour3.Name = "PanelFontColour3";
            this.PanelFontColour3.Size = new System.Drawing.Size(16, 18);
            this.PanelFontColour3.TabIndex = 2;
            this.PanelFontColour3.Tag = "3";
            this.toolTip1.SetToolTip(this.PanelFontColour3, "Set Verse Colour");
            this.PanelFontColour3.Click += new System.EventHandler(this.PanelFontColour_Click);
            // 
            // tbFontSize3
            // 
            this.tbFontSize3.Location = new System.Drawing.Point(150, 3);
            this.tbFontSize3.Name = "tbFontSize3";
            this.tbFontSize3.Size = new System.Drawing.Size(38, 20);
            this.tbFontSize3.TabIndex = 1;
            // 
            // toolStripFont3
            // 
            this.toolStripFont3.AutoSize = false;
            this.toolStripFont3.CanOverflow = false;
            this.toolStripFont3.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripFont3.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripFont3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripButton10,
            this.toolStripButton11,
            this.toolStripButton12});
            this.toolStripFont3.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStripFont3.Location = new System.Drawing.Point(75, 0);
            this.toolStripFont3.Name = "toolStripFont3";
            this.toolStripFont3.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripFont3.Size = new System.Drawing.Size(71, 26);
            this.toolStripFont3.TabIndex = 0;
            // 
            // toolStripButton10
            // 
            this.toolStripButton10.CheckOnClick = true;
            this.toolStripButton10.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton10.Image = global::Properties.Resources.bold1;
            this.toolStripButton10.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton10.Name = "toolStripButton10";
            this.toolStripButton10.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton10.Tag = "0";
            // 
            // toolStripButton11
            // 
            this.toolStripButton11.CheckOnClick = true;
            this.toolStripButton11.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton11.Image = global::Properties.Resources.italic;
            this.toolStripButton11.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton11.Name = "toolStripButton11";
            this.toolStripButton11.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton11.Tag = "1";
            // 
            // toolStripButton12
            // 
            this.toolStripButton12.CheckOnClick = true;
            this.toolStripButton12.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton12.Image = global::Properties.Resources.underline;
            this.toolStripButton12.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton12.Name = "toolStripButton12";
            this.toolStripButton12.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton12.Tag = "2";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(3, 5);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(37, 13);
            this.label4.TabIndex = 0;
            this.label4.Text = "Verse:";
            // 
            // panel3
            // 
            this.panel3.Controls.Add(this.PanelFontColour2);
            this.panel3.Controls.Add(this.tbFontSize2);
            this.panel3.Controls.Add(this.toolStripFont2);
            this.panel3.Controls.Add(this.label3);
            this.panel3.Location = new System.Drawing.Point(10, 65);
            this.panel3.Name = "panel3";
            this.panel3.Size = new System.Drawing.Size(210, 25);
            this.panel3.TabIndex = 2;
            // 
            // PanelFontColour2
            // 
            this.PanelFontColour2.BackColor = System.Drawing.Color.Black;
            this.PanelFontColour2.Cursor = System.Windows.Forms.Cursors.Hand;
            this.PanelFontColour2.Location = new System.Drawing.Point(192, 4);
            this.PanelFontColour2.Name = "PanelFontColour2";
            this.PanelFontColour2.Size = new System.Drawing.Size(16, 18);
            this.PanelFontColour2.TabIndex = 2;
            this.PanelFontColour2.Tag = "2";
            this.toolTip1.SetToolTip(this.PanelFontColour2, "Set Copyright/Ref Colour");
            this.PanelFontColour2.Click += new System.EventHandler(this.PanelFontColour_Click);
            // 
            // tbFontSize2
            // 
            this.tbFontSize2.Location = new System.Drawing.Point(150, 3);
            this.tbFontSize2.Name = "tbFontSize2";
            this.tbFontSize2.Size = new System.Drawing.Size(38, 20);
            this.tbFontSize2.TabIndex = 1;
            // 
            // toolStripFont2
            // 
            this.toolStripFont2.AutoSize = false;
            this.toolStripFont2.CanOverflow = false;
            this.toolStripFont2.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripFont2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripFont2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripButton6,
            this.toolStripButton7,
            this.toolStripButton8});
            this.toolStripFont2.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStripFont2.Location = new System.Drawing.Point(75, 0);
            this.toolStripFont2.Name = "toolStripFont2";
            this.toolStripFont2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripFont2.Size = new System.Drawing.Size(71, 26);
            this.toolStripFont2.TabIndex = 0;
            // 
            // toolStripButton6
            // 
            this.toolStripButton6.CheckOnClick = true;
            this.toolStripButton6.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton6.Image = global::Properties.Resources.bold1;
            this.toolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton6.Name = "toolStripButton6";
            this.toolStripButton6.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton6.Tag = "0";
            // 
            // toolStripButton7
            // 
            this.toolStripButton7.CheckOnClick = true;
            this.toolStripButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton7.Image = global::Properties.Resources.italic;
            this.toolStripButton7.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton7.Name = "toolStripButton7";
            this.toolStripButton7.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton7.Tag = "1";
            // 
            // toolStripButton8
            // 
            this.toolStripButton8.CheckOnClick = true;
            this.toolStripButton8.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton8.Image = global::Properties.Resources.underline;
            this.toolStripButton8.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton8.Name = "toolStripButton8";
            this.toolStripButton8.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton8.Tag = "2";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(3, 5);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(76, 13);
            this.label3.TabIndex = 0;
            this.label3.Text = "Copyright/Ref:";
            // 
            // panel2
            // 
            this.panel2.Controls.Add(this.PanelFontColour1);
            this.panel2.Controls.Add(this.tbFontSize1);
            this.panel2.Controls.Add(this.toolStripFont1);
            this.panel2.Controls.Add(this.label2);
            this.panel2.Location = new System.Drawing.Point(10, 41);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(210, 25);
            this.panel2.TabIndex = 1;
            // 
            // PanelFontColour1
            // 
            this.PanelFontColour1.BackColor = System.Drawing.Color.Black;
            this.PanelFontColour1.Cursor = System.Windows.Forms.Cursors.Hand;
            this.PanelFontColour1.Location = new System.Drawing.Point(192, 4);
            this.PanelFontColour1.Name = "PanelFontColour1";
            this.PanelFontColour1.Size = new System.Drawing.Size(16, 18);
            this.PanelFontColour1.TabIndex = 2;
            this.PanelFontColour1.Tag = "1";
            this.toolTip1.SetToolTip(this.PanelFontColour1, "Set Song Title Colour");
            this.PanelFontColour1.Click += new System.EventHandler(this.PanelFontColour_Click);
            // 
            // tbFontSize1
            // 
            this.tbFontSize1.Location = new System.Drawing.Point(150, 3);
            this.tbFontSize1.Name = "tbFontSize1";
            this.tbFontSize1.Size = new System.Drawing.Size(38, 20);
            this.tbFontSize1.TabIndex = 1;
            // 
            // toolStripFont1
            // 
            this.toolStripFont1.AutoSize = false;
            this.toolStripFont1.CanOverflow = false;
            this.toolStripFont1.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripFont1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripFont1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripButton2,
            this.toolStripButton3,
            this.toolStripButton4});
            this.toolStripFont1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStripFont1.Location = new System.Drawing.Point(75, 0);
            this.toolStripFont1.Name = "toolStripFont1";
            this.toolStripFont1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripFont1.Size = new System.Drawing.Size(71, 26);
            this.toolStripFont1.TabIndex = 0;
            // 
            // toolStripButton2
            // 
            this.toolStripButton2.CheckOnClick = true;
            this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton2.Image = global::Properties.Resources.bold1;
            this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton2.Name = "toolStripButton2";
            this.toolStripButton2.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton2.Tag = "0";
            // 
            // toolStripButton3
            // 
            this.toolStripButton3.CheckOnClick = true;
            this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton3.Image = global::Properties.Resources.italic;
            this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton3.Name = "toolStripButton3";
            this.toolStripButton3.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton3.Tag = "1";
            // 
            // toolStripButton4
            // 
            this.toolStripButton4.CheckOnClick = true;
            this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton4.Image = global::Properties.Resources.underline;
            this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton4.Name = "toolStripButton4";
            this.toolStripButton4.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton4.Tag = "2";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(3, 5);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(58, 13);
            this.label2.TabIndex = 0;
            this.label2.Text = "Song Title:";
            // 
            // panel1
            // 
            this.panel1.Controls.Add(this.PanelFontColour0);
            this.panel1.Controls.Add(this.tbFontSize0);
            this.panel1.Controls.Add(this.toolStripFont0);
            this.panel1.Controls.Add(this.label1);
            this.panel1.Location = new System.Drawing.Point(10, 17);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(210, 25);
            this.panel1.TabIndex = 0;
            // 
            // PanelFontColour0
            // 
            this.PanelFontColour0.BackColor = System.Drawing.Color.Black;
            this.PanelFontColour0.Cursor = System.Windows.Forms.Cursors.Hand;
            this.PanelFontColour0.Location = new System.Drawing.Point(192, 4);
            this.PanelFontColour0.Name = "PanelFontColour0";
            this.PanelFontColour0.Size = new System.Drawing.Size(16, 18);
            this.PanelFontColour0.TabIndex = 2;
            this.PanelFontColour0.Tag = "0";
            this.toolTip1.SetToolTip(this.PanelFontColour0, "Set Song Number Colour");
            this.PanelFontColour0.Click += new System.EventHandler(this.PanelFontColour_Click);
            // 
            // tbFontSize0
            // 
            this.tbFontSize0.Location = new System.Drawing.Point(150, 3);
            this.tbFontSize0.Name = "tbFontSize0";
            this.tbFontSize0.Size = new System.Drawing.Size(38, 20);
            this.tbFontSize0.TabIndex = 1;
            // 
            // toolStripFont0
            // 
            this.toolStripFont0.AutoSize = false;
            this.toolStripFont0.CanOverflow = false;
            this.toolStripFont0.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStripFont0.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
            this.toolStripFont0.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripButton100,
            this.toolStripButton101,
            this.toolStripButton102});
            this.toolStripFont0.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.toolStripFont0.Location = new System.Drawing.Point(75, 0);
            this.toolStripFont0.Name = "toolStripFont0";
            this.toolStripFont0.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.toolStripFont0.Size = new System.Drawing.Size(71, 26);
            this.toolStripFont0.TabIndex = 0;
            // 
            // toolStripButton100
            // 
            this.toolStripButton100.CheckOnClick = true;
            this.toolStripButton100.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton100.Image = global::Properties.Resources.bold1;
            this.toolStripButton100.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton100.Name = "toolStripButton100";
            this.toolStripButton100.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton100.Tag = "0";
            // 
            // toolStripButton101
            // 
            this.toolStripButton101.CheckOnClick = true;
            this.toolStripButton101.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton101.Image = global::Properties.Resources.italic;
            this.toolStripButton101.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton101.Name = "toolStripButton101";
            this.toolStripButton101.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton101.Tag = "1";
            // 
            // toolStripButton102
            // 
            this.toolStripButton102.CheckOnClick = true;
            this.toolStripButton102.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton102.Image = global::Properties.Resources.underline;
            this.toolStripButton102.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton102.Name = "toolStripButton102";
            this.toolStripButton102.Size = new System.Drawing.Size(23, 23);
            this.toolStripButton102.Tag = "2";
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(3, 5);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(75, 13);
            this.label1.TabIndex = 0;
            this.label1.Text = "Song Number:";
            // 
            // BtnIndexOnly
            // 
            this.BtnIndexOnly.Location = new System.Drawing.Point(125, 334);
            this.BtnIndexOnly.Name = "BtnIndexOnly";
            this.BtnIndexOnly.Size = new System.Drawing.Size(80, 24);
            this.BtnIndexOnly.TabIndex = 7;
            this.BtnIndexOnly.Text = "Index Only";
            this.BtnIndexOnly.Click += new System.EventHandler(this.BtnIndexOnly_Click);
            // 
            // BtnTitlesRef
            // 
            this.BtnTitlesRef.Location = new System.Drawing.Point(211, 334);
            this.BtnTitlesRef.Name = "BtnTitlesRef";
            this.BtnTitlesRef.Size = new System.Drawing.Size(80, 24);
            this.BtnTitlesRef.TabIndex = 40;
            this.BtnTitlesRef.Text = "Titles && Ref";
            this.BtnTitlesRef.Click += new System.EventHandler(this.BtnTitlesRef_Click);
            // 
            // groupBox4
            // 
            this.groupBox4.Controls.Add(this.OptPageSize1);
            this.groupBox4.Controls.Add(this.OptPageSize0);
            this.groupBox4.Location = new System.Drawing.Point(172, 229);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new System.Drawing.Size(62, 64);
            this.groupBox4.TabIndex = 41;
            this.groupBox4.TabStop = false;
            this.groupBox4.Text = "Size";
            // 
            // OptPageSize1
            // 
            this.OptPageSize1.AutoSize = true;
            this.OptPageSize1.Location = new System.Drawing.Point(5, 39);
            this.OptPageSize1.Name = "OptPageSize1";
            this.OptPageSize1.Size = new System.Drawing.Size(52, 17);
            this.OptPageSize1.TabIndex = 1;
            this.OptPageSize1.Text = "Letter";
            // 
            // OptPageSize0
            // 
            this.OptPageSize0.AutoSize = true;
            this.OptPageSize0.Location = new System.Drawing.Point(5, 18);
            this.OptPageSize0.Name = "OptPageSize0";
            this.OptPageSize0.Size = new System.Drawing.Size(38, 17);
            this.OptPageSize0.TabIndex = 0;
            this.OptPageSize0.Text = "A4";
            // 
            // FrmGenerateDoc
            // 
            this.AcceptButton = this.BtnOK;
            this.ClientSize = new System.Drawing.Size(472, 370);
            this.Controls.Add(this.groupBox4);
            this.Controls.Add(this.BtnTitlesRef);
            this.Controls.Add(this.BtnIndexOnly);
            this.Controls.Add(this.Mess1);
            this.Controls.Add(this.groupBox5);
            this.Controls.Add(this.groupBox7);
            this.Controls.Add(this.groupBox6);
            this.Controls.Add(this.groupBox3);
            this.Controls.Add(this.BtnSaveExit);
            this.Controls.Add(this.BtnCancel);
            this.Controls.Add(this.BtnOK);
            this.Controls.Add(this.ProgressBar1);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.groupBox1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "FrmGenerateDoc";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Generate RTF Document";
            this.Load += new System.EventHandler(this.FrmFormatPraiseBookDoc_Load);
            this.groupBox5.ResumeLayout(false);
            this.groupBox5.PerformLayout();
            this.groupBox7.ResumeLayout(false);
            this.groupBox7.PerformLayout();
            this.panel6.ResumeLayout(false);
            this.panel6.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbSpacing1)).EndInit();
            this.panel7.ResumeLayout(false);
            this.panel7.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbSpacing0)).EndInit();
            this.groupBox6.ResumeLayout(false);
            this.groupBox6.PerformLayout();
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.groupBox1.ResumeLayout(false);
            this.panel8.ResumeLayout(false);
            this.panel8.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize5)).EndInit();
            this.toolStripFont5.ResumeLayout(false);
            this.toolStripFont5.PerformLayout();
            this.panel5.ResumeLayout(false);
            this.panel5.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize4)).EndInit();
            this.toolStripFont4.ResumeLayout(false);
            this.toolStripFont4.PerformLayout();
            this.panel4.ResumeLayout(false);
            this.panel4.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize3)).EndInit();
            this.toolStripFont3.ResumeLayout(false);
            this.toolStripFont3.PerformLayout();
            this.panel3.ResumeLayout(false);
            this.panel3.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize2)).EndInit();
            this.toolStripFont2.ResumeLayout(false);
            this.toolStripFont2.PerformLayout();
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize1)).EndInit();
            this.toolStripFont1.ResumeLayout(false);
            this.toolStripFont1.PerformLayout();
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tbFontSize0)).EndInit();
            this.toolStripFont0.ResumeLayout(false);
            this.toolStripFont0.PerformLayout();
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            this.ResumeLayout(false);

		}

        private void BtnCancel_Click(object sender, EventArgs e)
        {
            base.Close();
        }
	}
}
